<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="../lib/metro.css" rel="stylesheet">

    <title>Test Accordion - Metro UI :: Popular HTML, CSS and JS library</title>
    <script>
        window.METRO_LIB_INFO = true
    </script>
</head>
<body class="m4-cloak">
<div class="container-fluid pos-sticky border-bottom bd-default">
    <div class="container">
        <nav data-role="appbar" data-expand-point="md">
            <span class="brand">Accordion</span>
            <div class="app-bar-item-static ml-auto">
                <input type="checkbox" data-role="theme-switcher"/>
            </div>
        </nav>
    </div>
</div>
    <div class="container mt-10">
        <h3>Role</h3>
        <div>
            <button onclick="$('#a1').data('accordion').close(0)">Close Frame</button>
            <button onclick="$('#a1').data('accordion').toggle(0)">Toggle Frame</button>
        </div>
        <div data-role="accordion" id="a1" data-save-state="true">
            <div class="frame active">
                <div class="heading" >Header 1</div>
                <div class="content">
                    <div class="p-2">Cur luba manducare? Pol, a bene ionicis tormento. Warm, sichuan-style pudding is best garnished with aged BBQ sauce.</div>
                </div>
            </div>
            <div class="frame">
                <div class="heading">Header 2</div>
                <div class="content">
                    <div class="p-2">Wildly open a starship. Belay, ye small wench- set sails for hunger! Springy, juicy pudding is best blended with whole ice water.</div>
                </div>
            </div>
            <div class="frame">
                <div class="heading">Header 3</div>
                <div class="content">
                    <div class="p-2">Bitter turkey can be made tasty by brushing with sweet chili sauce. Popcorn combines greatly with grey peanut butter.</div>
                </div>
            </div>
        </div>

        <br>
        <h3>Runtime</h3>

        <div id="a2">
            <div class="frame">
                <div class="heading">Header 1</div>
                <div class="content">
                    <div class="p-2">Cur luba manducare? Pol, a bene ionicis tormento. Warm, sichuan-style pudding is best garnished with aged BBQ sauce.</div>
                </div>
            </div>
            <div class="frame active">
                <div class="heading">Header 2</div>
                <div class="content">
                    <div class="p-2">Wildly open a starship. Belay, ye small wench- set sails for hunger! Springy, juicy pudding is best blended with whole ice water.</div>
                </div>
            </div>
            <div class="frame">
                <div class="heading">Header 3</div>
                <div class="content">
                    <div class="p-2">Bitter turkey can be made tasty by brushing with sweet chili sauce. Popcorn combines greatly with grey peanut butter.</div>
                </div>
            </div>
        </div>
    </div>

    <script>
        window.addEventListener('metroinitiated', function() {
            console.log('Welcome to Metro4');
        })
    </script>

    <script src="../lib/metro.js"></script>
    <script>
        $(function(){
            Metro.makePlugin("#a2", "accordion");
            console.log($("#a2").data("accordion"));
        })
    </script>
</body>
</html>
